home *** CD-ROM | disk | FTP | other *** search
- #define CURSES_LIBRARY 1
- #include <curses.h>
- #undef start_color
-
- #ifdef PDCDEBUG
- char *rcsid_startcol = "$Header: C:\CURSES\portable\RCS\startcol.c 2.1 1993/06/18 20:21:15 MH Rel MH $";
- #endif
-
-
-
-
- /*man-start*********************************************************************
-
- start_color() - Initialize and set up curses for color mode.
-
- PDCurses Description:
- This routine sets up curses to enable color support.
-
- Eight basic color are initialized: black, blue, green, cyan, red,
- magenta, yellow and white. Two global variables - COLORS and
- COLOR_PAIRS, as defined in <curses.h> header file - are also
- initialized. The se variables define the maximum number of colors
- and the maximum number of color-pairs supported.
-
- This routine must be called before any other curses routine which
- manipulates or uses colors. A good place to call it is immediately
- after initscr().
-
- PDCurses Return Value:
- This function returns ERR if the monitor does not support color.
- Otherwise OK is returned.
-
- PDCurses Errors:
- N/A
-
- Portability:
- PDCurses int start_color(void);
- SYS V curses int start_color(void);
-
- **man-end**********************************************************************/
-
- int COLORS=0,COLOR_PAIRS=0;
-
- int start_color(void)
- {
- #ifdef PDCDEBUG
- if (trace_on) PDC_debug("start_color() - called\n");
- #endif
-
- if (_cursvar.mono)
- return(ERR);
- COLORS = 8;
- COLOR_PAIRS = 33; /* actually only allows 32 */
- return(OK);
- }
-